public class Rect extends test {
    private double length;
    private double width;
    Rect(double length,double width){
        this.length=length;
        this.width=width;
    }
    @Override
    public void draw(){
        System.out.println("矩形: length= "+length+" width= " + width);
    }


    @Override
    void calcArea() {
        area = length * width;

    }}

